﻿'// ========================================================================= '
'// ------------------------------------------------------------------------- '
'//!				\file		CST_PolyArea.vb
'			        \date		june 2010
'			        \author		TNick
'
'			        \brief		Dialog for 3D points settings
'
'
'   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'   This file is considered universal knowledge. No restrictions
'   are imposed; use as you see fit.
'   Please read ReadMe.txt and Licence.txt in root folder
'   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'
'   
'
'// ------------------------------------------------------------------------- '
'// ========================================================================= '
'//
'//
'//
'//
'//  IMPORTS     ------------------------------------------------------------ '
#Region "Imports"

Imports System.Windows.Forms

#End Region
'//  IMPORTS     ============================================================ '
'//
'//
'//
'//
'//  DEFINITIONS    --------------------------------------------------------- '




'//  DEFINITIONS    ========================================================= '
'//
'//
'//
'//
'//  DATA    ---------------------------------------------------------------- '


'//  DATA    ================================================================ '
'//
'//
'//
'//
'//  CLASS    --------------------------------------------------------------- '

Public Class CST_PolyArea

    '// --------------------------------------------------------------------- '
    Private Sub OK_Button_Click(ByVal sender As System.Object, _
                                ByVal e As System.EventArgs) _
                                Handles OK_Button.Click

        Dim iOut as integer
        If CMain.GetInt(Me.TX_MaxIter.Text, iOut) = False Then
            MsgBox(CMain._T(tx.ERR_EXCEPT), _
                   MsgBoxStyle.Critical or MsgBoxStyle.ApplicationModal, _
                   CMain._T(tx.ERR))
            Return
        End If

        CM_PolyArea.Stgs.bDelInitPoly = Me.CK_DelOrig.Checked
        CM_PolyArea.Stgs.bLftOvr = Me.CK_PolyLft.Checked

        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub
    '// ===================================================================== '

    '// --------------------------------------------------------------------- '
    Private Sub Cancel_Button_Click(ByVal sender As System.Object, _
                                    ByVal e As System.EventArgs) _
                                    Handles Cancel_Button.Click
        
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub
    '// ===================================================================== '

    '// --------------------------------------------------------------------- '
    Private Sub CST_PolyArea_Load( _
        ByVal sender As System.Object,  _
        ByVal e As System.EventArgs) _
        Handles MyBase.Load


        Me.Text = CMain._T(TX.POLYAREA) & ". " & _
                CMain._T(TX.SETTINGS) & "."
        Me.OK_Button.Text = CMain._T(TX.OK)
        Me.Cancel_Button.Text = CMain._T(TX.CANCEL)
        Me.L_MaxNrIter.Text = CMain._T(TX.MAXITER)
        Me.CK_DelOrig.Text = CMain._T(TX.DELORIGPOLY)
        Me.CK_PolyLft.Text = CMain._T(TX.CREATEPLYLFT)
        Me.TP_General.Text = CMain._T(TX.GENERAL)

        Me.TX_MaxIter.Text = CM_PolyArea.Stgs.iIterMax.ToString

        Me.CK_DelOrig.Checked = CM_PolyArea.Stgs.bDelInitPoly
        Me.CK_PolyLft.Checked = CM_PolyArea.Stgs.bLftOvr


    End Sub
    '// ===================================================================== '

End Class

'//  CLASS    =============================================================== '
'//
'//
'//
'//
'//  FUNCTIONS    ----------------------------------------------------------- '

'//  FUNCTIONS    =========================================================== '
'//
'//
'//
'//
'// ------------------------------------------------------------------------- '
'// ========================================================================= '
